package com.ktwlsoft.archivemanage.domain.business.repositoryService.guiBusiness;

import java.util.List;

import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ktwlsoft.archivemanage.domain.dao.repository.guiBusiness.IGuidanceMendListHistoryMapper;
import com.ktwlsoft.archivemanage.domain.dao.entity.guiBusiness.GuidanceMendListHistory;

/**
 * guidance_mend_list_history--指导整改历史业务层接口实现类
 *
 * @author zhuhe on 2020-04-29 09:41:14
 * @version 1.0
 */
@Service
public class GuidanceMendListHistoryRepositoryService {
	
	private final IGuidanceMendListHistoryMapper guidanceMendListHistoryMapper;

	public GuidanceMendListHistoryRepositoryService(IGuidanceMendListHistoryMapper guidanceMendListHistoryMapper) {
		this.guidanceMendListHistoryMapper = guidanceMendListHistoryMapper;
	}

	/**
 	 * 查询分页 on 2020-04-29 09:41:14
 	 * @param pn 第几页
     * @param pageSize 每页多少条
 	 * @param guidanceMendListHistory guidanceMendListHistory
 	 * @return PageInfo<GuidanceMendListHistory>
 	 */
	public PageInfo<GuidanceMendListHistory> findPage(int pn,int pageSize,GuidanceMendListHistory guidanceMendListHistory) {
		PageHelper.startPage(pn,pageSize);
		PageInfo<GuidanceMendListHistory> pageInfo = new PageInfo<GuidanceMendListHistory>(guidanceMendListHistoryMapper.findList(guidanceMendListHistory));
		return pageInfo;
	}

    /**
	 * 查询集合 on 2020-04-29 09:41:14
	 * @param guidanceMendListHistory guidanceMendListHistory
	 * @return List<GuidanceMendListHistory>
	 */
	public List<GuidanceMendListHistory> findList(GuidanceMendListHistory guidanceMendListHistory) {
		return guidanceMendListHistoryMapper.findList(guidanceMendListHistory);
	}

    /**
	 * 根据ID查询信息 on 2020-04-29 09:41:14
	 * @param id	主键
	 * @return GuidanceMendListHistory
	 */
	public GuidanceMendListHistory getById(Long id){
		return guidanceMendListHistoryMapper.getById(id);
	}

   /**
	 * 新增 on 2020-04-29 09:41:14
	 * @param guidanceMendListHistory guidanceMendListHistory
	 * @return int
	 */
	public int insert(GuidanceMendListHistory guidanceMendListHistory){
		return guidanceMendListHistoryMapper.insert(guidanceMendListHistory);
	}

	/**
	 * 批量插入 2020-04-29 09:41:14
	 *
	 * @param list list
	 * @return int
	 */
	public int manyInsert(List<GuidanceMendListHistory> list){
	    return guidanceMendListHistoryMapper.manyInsert(list);
	}

   /**
	 * 修改 on 2020-04-29 09:41:14
	 * @param guidanceMendListHistory guidanceMendListHistory
	 * @return int
	 */
	public int update(GuidanceMendListHistory guidanceMendListHistory){
		return guidanceMendListHistoryMapper.update(guidanceMendListHistory);
	}

   /**
	 * 根据id集合批量删除信息 on 2020-04-29 09:41:14
	 * @param guidanceMendListHistoryArr	主键编号集合
	 * @return int
	 */
	public int deleteByIds(List<Long> guidanceMendListHistoryArr){
		return guidanceMendListHistoryMapper.deleteByIds(guidanceMendListHistoryArr);
	}

   /**
	 * 根据id删除信息 on 2020-04-29 09:41:14
	 * @param id id
	 * @return int
	 */
	public int deleteById(Long id){
		return guidanceMendListHistoryMapper.deleteById(id);
	}
}
